#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;

string Sum(string a,string b)
{
    if(a.length()<b.length())
    {
        string temp=a; a=b; b=temp;
    }
    int i,j;
    for(i=a.length()-1,j=b.length()-1;i>=0;i--,j--)
    {
        a[i]=(a[i]+(j>=0?b[j]-'0':0));
        if(a[i]>'9')
        {
            a[i] -=10;
            if(i) a[i-1]++;
            else a='1'+a;
        }
    }
    return a;
}
int main()
{
    freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int ncase,i;
    string a,b,c;
    cin>>ncase;
    for(i=1;i<=ncase;i++)
    {
        cin>>a>>b;
        c=Sum(a,b);
        printf("Case %d:\n",i);
        cout<<a<<" + "<<b<<" = "<<c<<endl;
        if(i<ncase) cout<<endl;
    }
    return 0;
}
